home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / TextEdit.a < prev    next >
Text File  |  1996-05-01  |  26KB  |  1,026 lines

  1. ;
  2. ;    File:        TextEdit.a
  3. ;
  4. ;    Contains:    TextEdit Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__TEXTEDIT__') = 'UNDEFINED' THEN
  19. __TEXTEDIT__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  25.     include 'Quickdraw.a'
  26.     ENDIF
  27.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  28.     include 'MixedMode.a'
  29.     ENDIF
  30.     IF &TYPE('__TEXTOBJECTS__') = 'UNDEFINED' THEN
  31.     include 'TextObjects.a'
  32.     ENDIF
  33.     IF &TYPE('__TEXTSERVICES__') = 'UNDEFINED' THEN
  34.     include 'TextServices.a'
  35.     ENDIF
  36.     IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
  37.  
  38.  
  39. ; typedef TERec *                        TEPtr
  40.  
  41. ; typedef TEPtr *                        TEHandle
  42.  
  43. ;
  44. ;    Important note about TEClickLoopProcPtr and WordBreakProcPtr
  45. ;
  46. ;    At one point these were defined as returning the function result in the 
  47. ;    condition code Z-bit.  This was correct, in that it was what the 68K
  48. ;    implementation of TextEdit actually tested.  But, MixedMode had a different 
  49. ;    idea of what returning a boolean in the Z-bit meant.  MixedMode was setting
  50. ;    the Z-bit the complement of what was wanted.  
  51. ;    
  52. ;    Therefore, these ProcPtrs have been changed (back) to return the result in
  53. ;    register D0.  It turns out that for register based routines, 
  54. ;    MixedMode sets the Z-bit of the 68K emulator based on the contents 
  55. ;    of the return result register.  Thus we can get the Z-bit set correctly.  
  56. ;    
  57. ;    But, when TextEdit is recoded in PowerPC, if it calls a 68K ClickLoop
  58. ;    or WordBreak routine, register D0 had better have the result (in addition
  59. ;    to the Z-bit). Therefore all 68K apps should make sure their ClickLoop or
  60. ;    WordBreak routines set register D0 at the end.
  61. ;
  62. ;
  63. ;    There is no function to get/set the low-mem for FindWordHook at 0x07F8.
  64. ;    This is because it is not a low-mem ProcPtr. That address is the entry
  65. ;    in the OS TrapTable for trap 0xA0FE.  You can use Get/SetTrapAddress to 
  66. ;    acccess it.    
  67. ;
  68. ;
  69. ;    The following ProcPtrs cannot be written in or called from a high-level 
  70. ;    language without the help of mixed mode or assembly glue because they 
  71. ;    use the following parameter-passing conventions:
  72. ;
  73. ;    typedef pascal void (*HighHookProcPtr)(const Rect *r, TEPtr pTE);
  74. ;    typedef pascal void (*CaretHookProcPtr)(const Rect *r, TEPtr pTE);
  75. ;
  76. ;        In:
  77. ;            =>     r                        on stack
  78. ;            =>    pTE                        A3.L
  79. ;        Out:
  80. ;            none
  81. ;
  82. ;    typedef pascal Boolean (*EOLHookProcPtr)(char theChar, TEPtr pTE, TEHandle hTE);
  83. ;
  84. ;        In:
  85. ;            =>     theChar                    D0.B
  86. ;            =>    pTE                        A3.L
  87. ;            =>    hTE                        A4.L
  88. ;        Out:
  89. ;            <=    Boolean                    Z bit of the CCR
  90. ;
  91. ;    typedef pascal unsigned short (*WidthHookProcPtr)(unsigned short textLen,
  92. ;     unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
  93. ;    typedef pascal unsigned short (*TextWidthHookProcPtr)(unsigned short textLen,
  94. ;     unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
  95. ;
  96. ;        In:
  97. ;            =>     textLen                    D0.W
  98. ;            =>    textOffset                D1.W
  99. ;            =>    textBufferPtr            A0.L
  100. ;            =>    pTE                        A3.L
  101. ;            =>    hTE                        A4.L
  102. ;        Out:
  103. ;            <=    unsigned short            D1.W
  104. ;
  105. ;    typedef pascal unsigned short (*NWidthHookProcPtr)(unsigned short styleRunLen,
  106. ;     unsigned short styleRunOffset, short slop, short direction, void *textBufferPtr, 
  107. ;     short *lineStart, TEPtr pTE, TEHandle hTE);
  108. ;
  109. ;        In:
  110. ;            =>     styleRunLen                D0.W
  111. ;            =>    styleRunOffset            D1.W
  112. ;            =>    slop                    D2.W (low)
  113. ;            =>    direction                D2.W (high)
  114. ;            =>    textBufferPtr            A0.L
  115. ;            =>    lineStart                A2.L
  116. ;            =>    pTE                        A3.L
  117. ;            =>    hTE                        A4.L
  118. ;        Out:
  119. ;            <=    unsigned short            D1.W
  120. ;
  121. ;    typedef pascal void (*DrawHookProcPtr)(unsigned short textOffset, unsigned short drawLen,
  122. ;     void *textBufferPtr, TEPtr pTE, TEHandle hTE);
  123. ;
  124. ;        In:
  125. ;            =>     textOffset                D0.W
  126. ;            =>    drawLen                    D1.W
  127. ;            =>    textBufferPtr            A0.L
  128. ;            =>    pTE                        A3.L
  129. ;            =>    hTE                        A4.L
  130. ;        Out:
  131. ;            none
  132. ;
  133. ;    typedef pascal Boolean (*HitTestHookProcPtr)(unsigned short styleRunLen,
  134. ;     unsigned short styleRunOffset, unsigned short slop, void *textBufferPtr,
  135. ;     TEPtr pTE, TEHandle hTE, unsigned short *pixelWidth, unsigned short *charOffset, 
  136. ;     Boolean *pixelInChar);
  137. ;
  138. ;        In:
  139. ;            =>     styleRunLen                D0.W
  140. ;            =>    styleRunOffset            D1.W
  141. ;            =>    slop                    D2.W
  142. ;            =>    textBufferPtr            A0.L
  143. ;            =>    pTE                        A3.L
  144. ;            =>    hTE                        A4.L
  145. ;        Out:
  146. ;            <=    pixelWidth                D0.W (low)
  147. ;            <=    Boolean                    D0.W (high)
  148. ;            <=    charOffset                D1.W
  149. ;            <=    pixelInChar                D2.W
  150. ;
  151. ;    typedef pascal void (*TEFindWordProcPtr)(unsigned short currentPos, short caller, 
  152. ;     TEPtr pTE, TEHandle hTE, unsigned short *wordStart, unsigned short *wordEnd);
  153. ;
  154. ;        In:
  155. ;            =>     currentPos                D0.W
  156. ;            =>    caller                    D2.W
  157. ;            =>    pTE                        A3.L
  158. ;            =>    hTE                        A4.L
  159. ;        Out:
  160. ;            <=    wordStart                D0.W
  161. ;            <=    wordEnd                    D1.W
  162. ;
  163. ;    typedef pascal void (*TERecalcProcPtr)(TEPtr pTE, unsigned short changeLength,
  164. ;       unsigned short *lineStart, unsigned short *firstChar, unsigned short *lastChar);
  165. ;
  166. ;        In:
  167. ;            =>     pTE                        A3.L
  168. ;            =>    changeLength            D7.W
  169. ;        Out:
  170. ;            <=    lineStart                D2.W
  171. ;            <=    firstChar                D3.W
  172. ;            <=    lastChar                D4.W
  173. ;
  174. ;    typedef pascal void (*TEDoTextProcPtr)(TEPtr pTE, unsigned short firstChar, unsigned short lastChar,
  175. ;                         short selector, GrafPtr *currentGrafPort, short *charPosition);
  176. ;
  177. ;        In:
  178. ;            =>     pTE                        A3.L
  179. ;            =>    firstChar                D3.W
  180. ;            =>    lastChar                D4.W
  181. ;            =>    selector                D7.W
  182. ;        Out:
  183. ;            <=    currentGrafPort            A0.L
  184. ;            <=    charPosition            D0.W
  185. ;            
  186. ;
  187. TERec                    RECORD 0
  188. destRect                 ds        Rect            ; offset: $0 (0)
  189. viewRect                 ds        Rect            ; offset: $8 (8)
  190. selRect                     ds        Rect            ; offset: $10 (16)
  191. lineHeight                 ds.w    1                ; offset: $18 (24)
  192. fontAscent                 ds.w    1                ; offset: $1A (26)
  193. selPoint                 ds        Point            ; offset: $1C (28)
  194. selStart                 ds.w    1                ; offset: $20 (32)
  195. selEnd                     ds.w    1                ; offset: $22 (34)
  196. active                     ds.w    1                ; offset: $24 (36)
  197. wordBreak                 ds.l    1                ; offset: $26 (38)
  198. clickLoop                 ds.l    1                ; offset: $2A (42)
  199. clickTime                 ds.l    1                ; offset: $2E (46)
  200. clickLoc                 ds.w    1                ; offset: $32 (50)
  201. caretTime                 ds.l    1                ; offset: $34 (52)
  202. caretState                 ds.w    1                ; offset: $38 (56)
  203. just                     ds.w    1                ; offset: $3A (58)
  204. teLength                 ds.w    1                ; offset: $3C (60)
  205. hText                     ds.l    1                ; offset: $3E (62)
  206. hDispatchRec             ds.l    1                ; offset: $42 (66)        ;  added to replace recalBack & recalLines.  it's a handle anyway 
  207. clikStuff                 ds.w    1                ; offset: $46 (70)
  208. crOnly                     ds.w    1                ; offset: $48 (72)
  209. txFont                     ds.w    1                ; offset: $4A (74)
  210. txFace                     ds.w    1                ; offset: $4C (76)        ; txFace is unpacked byte
  211. txMode                     ds.w    1                ; offset: $4E (78)
  212. txSize                     ds.w    1                ; offset: $50 (80)
  213. inPort                     ds.l    1                ; offset: $52 (82)
  214. highHook                 ds.l    1                ; offset: $56 (86)
  215. caretHook                 ds.l    1                ; offset: $5A (90)
  216. nLines                     ds.w    1                ; offset: $5E (94)
  217. lineStarts                 ds.w    16001            ; offset: $60 (96)
  218. sizeof                     EQU *                    ; size:   $7D62 (32098)
  219.                         ENDR
  220.  
  221.                                                             ; Justification (word alignment) styles 
  222. teJustLeft                        EQU        0
  223. teJustCenter                    EQU        1
  224. teJustRight                        EQU        -1
  225. teForceLeft                        EQU        -2                    ; new names for the Justification (word alignment) styles 
  226. teFlushDefault                    EQU        0                    ;flush according to the line direction 
  227. teCenter                        EQU        1                    ;center justify (word alignment) 
  228. teFlushRight                    EQU        -1                    ;flush right for all scripts 
  229. teFlushLeft                        EQU        -2                    ;flush left for all scripts 
  230.                                                             ; Set/Replace style modes 
  231. fontBit                            EQU        0                    ;set font
  232. faceBit                            EQU        1                    ;set face
  233. sizeBit                            EQU        2                    ;set size
  234. clrBit                            EQU        3                    ;set color
  235. addSizeBit                        EQU        4                    ;add size mode
  236. toggleBit                        EQU        5                    ;set faces in toggle mode
  237.                                                             ; TESetStyle/TEContinuousStyle modes 
  238. doFont                            EQU        1                    ; set font (family) number
  239. doFace                            EQU        2                    ;set character style
  240. doSize                            EQU        4                    ;set type size
  241. doColor                            EQU        8                    ;set color
  242. doAll                            EQU        15                    ;set all attributes
  243. addSize                            EQU        16                    ;adjust type size
  244.  
  245. doToggle                        EQU        32                    ;toggle mode for TESetStyle
  246.                                                             ; offsets into TEDispatchRec 
  247. EOLHook                            EQU        0                    ;[UniversalProcPtr] TEEOLHook
  248. DRAWHook                        EQU        4                    ;[UniversalProcPtr] TEWidthHook
  249. WIDTHHook                        EQU        8                    ;[UniversalProcPtr] TEDrawHook
  250. HITTESTHook                        EQU        12                    ;[UniversalProcPtr] TEHitTestHook
  251. nWIDTHHook                        EQU        24                    ;[UniversalProcPtr] nTEWidthHook
  252. TextWidthHook                    EQU        28                    ;[UniversalProcPtr] TETextWidthHook
  253.                                                             ; selectors for TECustomHook 
  254. intEOLHook                        EQU        0                    ;TEIntHook value
  255. intDrawHook                        EQU        1                    ;TEIntHook value
  256. intWidthHook                    EQU        2                    ;TEIntHook value
  257. intHitTestHook                    EQU        3                    ;TEIntHook value
  258. intNWidthHook                    EQU        6                    ;TEIntHook value for new version of WidthHook
  259. intTextWidthHook                EQU        7                    ;TEIntHook value for new TextWidthHook
  260. intInlineInputTSMTEPreUpdateHook EQU    8                    ;TEIntHook value for TSMTEPreUpdateProcPtr callback
  261. intInlineInputTSMTEPostUpdateHook EQU    9                    ;TEIntHook value for TSMTEPostUpdateProcPtr callback
  262.                                                             ; feature or bit definitions for TEFeatureFlag 
  263. teFAutoScroll                    EQU        0                    ;00000001b
  264. teFTextBuffering                EQU        1                    ;00000010b
  265. teFOutlineHilite                EQU        2                    ;00000100b
  266. teFInlineInput                    EQU        3                    ;00001000b 
  267.                                                             ;    teFUseTextServices    is obsolete as of System 8.                    
  268. teFUseInlineInput                EQU        5                    ;00100000b 
  269. teFInlineInputAutoScroll        EQU        6                    ;01000000b 
  270.  
  271.                                                             ; action for the new "bit (un)set" interface, TEFeatureFlag 
  272. teBitClear                        EQU        0
  273. teBitSet                        EQU        1                    ;set the selector bit
  274. teBitTest                        EQU        -1                    ;no change; just return the current setting
  275.                                                             ;constants for identifying the routine that called FindWord 
  276. teWordSelect                    EQU        4                    ;clickExpand to select word
  277. teWordDrag                        EQU        8                    ;clickExpand to drag new word
  278. teFromFind                        EQU        12                    ;FindLine called it ($0C)
  279. teFromRecal                        EQU        16                    ;RecalLines called it ($10)      obsolete 
  280.                                                             ;constants for identifying TEDoText selectors 
  281. teFind                            EQU        0                    ;TEDoText called for searching
  282. teHighlight                        EQU        1                    ;TEDoText called for highlighting
  283. teDraw                            EQU        -1                    ;TEDoText called for drawing text
  284. teCaret                            EQU        -2                    ;TEDoText called for drawing the caret
  285. Chars                    RECORD 0
  286. elements                 ds.b    32001
  287.                          ORG 32002
  288. sizeof                     EQU *                    ; size:   $7D02 (32002)
  289.                         ENDR
  290.  
  291.  
  292. ; typedef CharsPtr *                    CharsHandle
  293.  
  294. StyleRun                RECORD 0
  295. startChar                 ds.w    1                ; offset: $0 (0)        ; starting character position
  296. styleIndex                 ds.w    1                ; offset: $2 (2)        ; index in style table
  297. sizeof                     EQU *                    ; size:   $4 (4)
  298.                         ENDR
  299. STElement                RECORD 0
  300. stCount                     ds.w    1                ; offset: $0 (0)        ; number of runs in this style
  301. stHeight                 ds.w    1                ; offset: $2 (2)        ; line height
  302. stAscent                 ds.w    1                ; offset: $4 (4)        ; font ascent
  303. stFont                     ds.w    1                ; offset: $6 (6)        ; font (family) number
  304. stFace                     ds.w    1                ; offset: $8 (8)        ; character Style
  305. stSize                     ds.w    1                ; offset: $A (10)        ; size in points
  306. stColor                     ds        RGBColor        ; offset: $C (12)        ; absolute (RGB) color
  307. sizeof                     EQU *                    ; size:   $12 (18)
  308.                         ENDR
  309. TEStyleTable            RECORD 0
  310. elements                 ds.b    1777 * STElement.sizeof
  311. sizeof                     EQU *                    ; size:   $7CF2 (31986)
  312.                         ENDR
  313.  
  314.  
  315. ; typedef STPtr *                        STHandle
  316.  
  317. LHElement                RECORD 0
  318. lhHeight                 ds.w    1                ; offset: $0 (0)        ; maximum height in line
  319. lhAscent                 ds.w    1                ; offset: $2 (2)        ; maximum ascent in line
  320. sizeof                     EQU *                    ; size:   $4 (4)
  321.                         ENDR
  322. LHTable                    RECORD 0
  323. elements                 ds.b    8001 * LHElement.sizeof
  324. sizeof                     EQU *                    ; size:   $7D04 (32004)
  325.                         ENDR
  326.  
  327.  
  328. ; typedef LHPtr *                        LHHandle
  329.  
  330. ScrpSTElement            RECORD 0
  331. scrpStartChar             ds.l    1                ; offset: $0 (0)        ; starting character position
  332. scrpHeight                 ds.w    1                ; offset: $4 (4)
  333. scrpAscent                 ds.w    1                ; offset: $6 (6)
  334. scrpFont                 ds.w    1                ; offset: $8 (8)
  335. scrpFace                 ds.w    1                ; offset: $A (10)        ; unpacked byte
  336. scrpSize                 ds.w    1                ; offset: $C (12)
  337. scrpColor                 ds        RGBColor        ; offset: $E (14)
  338. sizeof                     EQU *                    ; size:   $14 (20)
  339.                         ENDR
  340. ;  ARRAY [0..1600] OF ScrpSTElement 
  341. ScrpSTTable                RECORD 0
  342. elements                 ds.b    1601 * ScrpSTElement.sizeof
  343. sizeof                     EQU *                    ; size:   $7D14 (32020)
  344.                         ENDR
  345.  
  346.  
  347. StScrpRec                RECORD 0
  348. scrpNStyles                 ds.w    1                ; offset: $0 (0)        ; number of styles in scrap
  349. scrpStyleTab             ds        ScrpSTTable        ; offset: $2 (2)        ; table of styles for scrap
  350. sizeof                     EQU *                    ; size:   $7D16 (32022)
  351.                         ENDR
  352. ; typedef struct StScrpRec *            StScrpPtr
  353.  
  354. ; typedef StScrpPtr *                    StScrpHandle
  355.  
  356. NullStRec                RECORD 0
  357. teReserved                 ds.l    1                ; offset: $0 (0)        ; reserved for future expansion
  358. nullScrap                 ds.l    1                ; offset: $4 (4)        ; handle to scrap style table
  359. sizeof                     EQU *                    ; size:   $8 (8)
  360.                         ENDR
  361. ; typedef struct NullStRec *            NullStPtr
  362.  
  363. ; typedef NullStPtr *                    NullStHandle
  364.  
  365. TEStyleRec                RECORD 0
  366. nRuns                     ds.w    1                ; offset: $0 (0)        ; number of style runs
  367. nStyles                     ds.w    1                ; offset: $2 (2)        ; size of style table
  368. styleTab                 ds.l    1                ; offset: $4 (4)        ; handle to style table
  369. lhTab                     ds.l    1                ; offset: $8 (8)        ; handle to line-height table
  370. teRefCon                 ds.l    1                ; offset: $C (12)        ; reserved for application use
  371. nullStyle                 ds.l    1                ; offset: $10 (16)        ; Handle to style set at null selection
  372. runs                     ds.b    8001 * StyleRun.sizeof ; offset: $14 (20) ; ARRAY [0..8000] OF StyleRun
  373. sizeof                     EQU *                    ; size:   $7D18 (32024)
  374.                         ENDR
  375. ; typedef struct TEStyleRec *            TEStylePtr
  376.  
  377. ; typedef TEStylePtr *                    TEStyleHandle
  378.  
  379. TextStyle                RECORD 0
  380. tsFont                     ds.w    1                ; offset: $0 (0)        ; font (family) number
  381. tsFace                     ds.w    1                ; offset: $2 (2)        ; character Style
  382. tsSize                     ds.w    1                ; offset: $4 (4)        ; size in point
  383. tsColor                     ds        RGBColor        ; offset: $6 (6)        ; absolute (RGB) color
  384. sizeof                     EQU *                    ; size:   $C (12)
  385.                         ENDR
  386. ; typedef struct TextStyle *            TextStylePtr
  387.  
  388. ; typedef TextStylePtr *                TextStyleHandle
  389.  
  390. ; typedef short                         TEIntHook
  391.  
  392.     ENDIF
  393.     IF FOR_SYSTEM8_COOPERATIVE THEN
  394.  
  395.                                                             ; feature or bit definitions for TEFeatureFlag System 8 
  396. teFEnableInteractiveServices    EQU        7                    ;10000000b 
  397.                                                             ; selectors for TECustomHook 
  398. intInlineInputPreUpdateHook        EQU        10                    ;TEIntHook value for TEPreUpdateProcPtr callback
  399. intInlineInputPostUpdateHook    EQU        11                    ;TEIntHook value for TEPostUpdateProcPtr callback
  400.     ENDIF
  401.     IF FOR_SYSTEM7_ONLY THEN
  402.  
  403.                                                             ; feature bit 4 for TEFeatureFlag no longer in use 
  404. teFUseTextServices                EQU        4                    ;00010000b 
  405.     ENDIF
  406.     IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
  407. ;
  408. ; pascal Handle TEScrapHandle(void)
  409. ;
  410.     IF ¨ GENERATINGCFM THEN
  411.         Macro
  412.         _TEScrapHandle        &dest=(sp)
  413.             move.l            $0AB4,&dest
  414.         EndM
  415.     ELSE
  416.         IMPORT_CFM_FUNCTION TEScrapHandle
  417.     ENDIF
  418.  
  419. ;
  420. ; pascal void TEInit(void )
  421. ;
  422.     IF ¨ GENERATINGCFM THEN
  423.         _TEInit:    OPWORD    $A9CC
  424.     ELSE
  425.         IMPORT_CFM_FUNCTION TEInit
  426.     ENDIF
  427.  
  428. ;
  429. ; pascal TEHandle TENew(const Rect *destRect, const Rect *viewRect)
  430. ;
  431.     IF ¨ GENERATINGCFM THEN
  432.         _TENew:    OPWORD    $A9D2
  433.     ELSE
  434.         IMPORT_CFM_FUNCTION TENew
  435.     ENDIF
  436.  
  437. ;
  438. ; pascal void TEDispose(TEHandle hTE)
  439. ;
  440.     IF ¨ GENERATINGCFM THEN
  441.         _TEDispose:    OPWORD    $A9CD
  442.     ELSE
  443.         IMPORT_CFM_FUNCTION TEDispose
  444.     ENDIF
  445.  
  446. ;
  447. ; pascal void TESetText(const void *text, long length, TEHandle hTE)
  448. ;
  449.     IF ¨ GENERATINGCFM THEN
  450.         _TESetText:    OPWORD    $A9CF
  451.     ELSE
  452.         IMPORT_CFM_FUNCTION TESetText
  453.     ENDIF
  454.  
  455. ;
  456. ; pascal CharsHandle TEGetText(TEHandle hTE)
  457. ;
  458.     IF ¨ GENERATINGCFM THEN
  459.         _TEGetText:    OPWORD    $A9CB
  460.     ELSE
  461.         IMPORT_CFM_FUNCTION TEGetText
  462.     ENDIF
  463.  
  464. ;
  465. ; pascal void TEIdle(TEHandle hTE)
  466. ;
  467.     IF ¨ GENERATINGCFM THEN
  468.         _TEIdle:    OPWORD    $A9DA
  469.     ELSE
  470.         IMPORT_CFM_FUNCTION TEIdle
  471.     ENDIF
  472.  
  473. ;
  474. ; pascal void TESetSelect(long selStart, long selEnd, TEHandle hTE)
  475. ;
  476.     IF ¨ GENERATINGCFM THEN
  477.         _TESetSelect:    OPWORD    $A9D1
  478.     ELSE
  479.         IMPORT_CFM_FUNCTION TESetSelect
  480.     ENDIF
  481.  
  482. ;
  483. ; pascal void TEActivate(TEHandle hTE)
  484. ;
  485.     IF ¨ GENERATINGCFM THEN
  486.         _TEActivate:    OPWORD    $A9D8
  487.     ELSE
  488.         IMPORT_CFM_FUNCTION TEActivate
  489.     ENDIF
  490.  
  491. ;
  492. ; pascal void TEDeactivate(TEHandle hTE)
  493. ;
  494.     IF ¨ GENERATINGCFM THEN
  495.         _TEDeactivate:    OPWORD    $A9D9
  496.     ELSE
  497.         IMPORT_CFM_FUNCTION TEDeactivate
  498.     ENDIF
  499.  
  500. ;
  501. ; pascal void TEKey(CharParameter key, TEHandle hTE)
  502. ;
  503.     IF ¨ GENERATINGCFM THEN
  504.         _TEKey:    OPWORD    $A9DC
  505.     ELSE
  506.         IMPORT_CFM_FUNCTION TEKey
  507.     ENDIF
  508.  
  509. ;
  510. ; pascal void TECut(TEHandle hTE)
  511. ;
  512.     IF ¨ GENERATINGCFM THEN
  513.         _TECut:    OPWORD    $A9D6
  514.     ELSE
  515.         IMPORT_CFM_FUNCTION TECut
  516.     ENDIF
  517.  
  518. ;
  519. ; pascal void TECopy(TEHandle hTE)
  520. ;
  521.     IF ¨ GENERATINGCFM THEN
  522.         _TECopy:    OPWORD    $A9D5
  523.     ELSE
  524.         IMPORT_CFM_FUNCTION TECopy
  525.     ENDIF
  526.  
  527. ;
  528. ; pascal void TEPaste(TEHandle hTE)
  529. ;
  530.     IF ¨ GENERATINGCFM THEN
  531.         _TEPaste:    OPWORD    $A9DB
  532.     ELSE
  533.         IMPORT_CFM_FUNCTION TEPaste
  534.     ENDIF
  535.  
  536. ;
  537. ; pascal void TEDelete(TEHandle hTE)
  538. ;
  539.     IF ¨ GENERATINGCFM THEN
  540.         _TEDelete:    OPWORD    $A9D7
  541.     ELSE
  542.         IMPORT_CFM_FUNCTION TEDelete
  543.     ENDIF
  544.  
  545. ;
  546. ; pascal void TEInsert(const void *text, long length, TEHandle hTE)
  547. ;
  548.     IF ¨ GENERATINGCFM THEN
  549.         _TEInsert:    OPWORD    $A9DE
  550.     ELSE
  551.         IMPORT_CFM_FUNCTION TEInsert
  552.     ENDIF
  553.  
  554. ;
  555. ; pascal void TESetAlignment(short just, TEHandle hTE)
  556. ;
  557.     IF ¨ GENERATINGCFM THEN
  558.         _TESetAlignment:    OPWORD    $A9DF
  559.     ELSE
  560.         IMPORT_CFM_FUNCTION TESetAlignment
  561.     ENDIF
  562.  
  563. ;
  564. ; pascal void TEUpdate(const Rect *rUpdate, TEHandle hTE)
  565. ;
  566.     IF ¨ GENERATINGCFM THEN
  567.         _TEUpdate:    OPWORD    $A9D3
  568.     ELSE
  569.         IMPORT_CFM_FUNCTION TEUpdate
  570.     ENDIF
  571.  
  572. ;
  573. ; pascal void TETextBox(const void *text, long length, const Rect *box, short just)
  574. ;
  575.     IF ¨ GENERATINGCFM THEN
  576.         _TETextBox:    OPWORD    $A9CE
  577.     ELSE
  578.         IMPORT_CFM_FUNCTION TETextBox
  579.     ENDIF
  580.  
  581. ;
  582. ; pascal void TEScroll(short dh, short dv, TEHandle hTE)
  583. ;
  584.     IF ¨ GENERATINGCFM THEN
  585.         _TEScroll:    OPWORD    $A9DD
  586.     ELSE
  587.         IMPORT_CFM_FUNCTION TEScroll
  588.     ENDIF
  589.  
  590. ;
  591. ; pascal void TESelView(TEHandle hTE)
  592. ;
  593.     IF ¨ GENERATINGCFM THEN
  594.         _TESelView:    OPWORD    $A811
  595.     ELSE
  596.         IMPORT_CFM_FUNCTION TESelView
  597.     ENDIF
  598.  
  599. ;
  600. ; pascal void TEPinScroll(short dh, short dv, TEHandle hTE)
  601. ;
  602.     IF ¨ GENERATINGCFM THEN
  603.         _TEPinScroll:    OPWORD    $A812
  604.     ELSE
  605.         IMPORT_CFM_FUNCTION TEPinScroll
  606.     ENDIF
  607.  
  608. ;
  609. ; pascal void TEAutoView(Boolean fAuto, TEHandle hTE)
  610. ;
  611.     IF ¨ GENERATINGCFM THEN
  612.         _TEAutoView:    OPWORD    $A813
  613.     ELSE
  614.         IMPORT_CFM_FUNCTION TEAutoView
  615.     ENDIF
  616.  
  617. ;
  618. ; pascal void TECalText(TEHandle hTE)
  619. ;
  620.     IF ¨ GENERATINGCFM THEN
  621.         _TECalText:    OPWORD    $A9D0
  622.     ELSE
  623.         IMPORT_CFM_FUNCTION TECalText
  624.     ENDIF
  625.  
  626. ;
  627. ; pascal short TEGetOffset(Point pt, TEHandle hTE)
  628. ;
  629.     IF ¨ GENERATINGCFM THEN
  630.         _TEGetOffset:    OPWORD    $A83C
  631.     ELSE
  632.         IMPORT_CFM_FUNCTION TEGetOffset
  633.     ENDIF
  634.  
  635. ;
  636. ; pascal Point TEGetPoint(short offset, TEHandle hTE)
  637. ;
  638.     IF ¨ GENERATINGCFM THEN
  639.         Macro
  640.         _TEGetPoint
  641.             move.w              #$0008,-(sp)
  642.             dc.w                $A83D
  643.         EndM
  644.     ELSE
  645.         IMPORT_CFM_FUNCTION TEGetPoint
  646.     ENDIF
  647.  
  648. ;
  649. ; pascal void TEClick(Point pt, Boolean fExtend, TEHandle h)
  650. ;
  651.     IF ¨ GENERATINGCFM THEN
  652.         _TEClick:    OPWORD    $A9D4
  653.     ELSE
  654.         IMPORT_CFM_FUNCTION TEClick
  655.     ENDIF
  656.  
  657. ;
  658. ; pascal TEHandle TEStyleNew(const Rect *destRect, const Rect *viewRect)
  659. ;
  660.     IF ¨ GENERATINGCFM THEN
  661.         _TEStyleNew:    OPWORD    $A83E
  662.     ELSE
  663.         IMPORT_CFM_FUNCTION TEStyleNew
  664.     ENDIF
  665.  
  666. ;
  667. ; pascal void TESetStyleHandle(TEStyleHandle theHandle, TEHandle hTE)
  668. ;
  669.     IF ¨ GENERATINGCFM THEN
  670.         Macro
  671.         _TESetStyleHandle
  672.             move.w              #$0005,-(sp)
  673.             dc.w                $A83D
  674.         EndM
  675.     ELSE
  676.         IMPORT_CFM_FUNCTION TESetStyleHandle
  677.     ENDIF
  678.  
  679. ;
  680. ; pascal TEStyleHandle TEGetStyleHandle(TEHandle hTE)
  681. ;
  682.     IF ¨ GENERATINGCFM THEN
  683.         Macro
  684.         _TEGetStyleHandle
  685.             move.w              #$0004,-(sp)
  686.             dc.w                $A83D
  687.         EndM
  688.     ELSE
  689.         IMPORT_CFM_FUNCTION TEGetStyleHandle
  690.     ENDIF
  691.  
  692. ;
  693. ; pascal void TEGetStyle(short offset, TextStyle *theStyle, short *lineHeight, short *fontAscent, TEHandle hTE)
  694. ;
  695.     IF ¨ GENERATINGCFM THEN
  696.         Macro
  697.         _TEGetStyle
  698.             move.w              #$0003,-(sp)
  699.             dc.w                $A83D
  700.         EndM
  701.     ELSE
  702.         IMPORT_CFM_FUNCTION TEGetStyle
  703.     ENDIF
  704.  
  705. ;
  706. ; pascal void TEStylePaste(TEHandle hTE)
  707. ;
  708.     IF ¨ GENERATINGCFM THEN
  709.         Macro
  710.         _TEStylePaste
  711.             move.w              #$0000,-(sp)
  712.             dc.w                $A83D
  713.         EndM
  714.     ELSE
  715.         IMPORT_CFM_FUNCTION TEStylePaste
  716.     ENDIF
  717.  
  718. ;
  719. ; pascal void TESetStyle(short mode, const TextStyle *newStyle, Boolean fRedraw, TEHandle hTE)
  720. ;
  721.     IF ¨ GENERATINGCFM THEN
  722.         Macro
  723.         _TESetStyle
  724.             move.w              #$0001,-(sp)
  725.             dc.w                $A83D
  726.         EndM
  727.     ELSE
  728.         IMPORT_CFM_FUNCTION TESetStyle
  729.     ENDIF
  730.  
  731. ;
  732. ; pascal void TEReplaceStyle(short mode, const TextStyle *oldStyle, const TextStyle *newStyle, Boolean fRedraw, TEHandle hTE)
  733. ;
  734.     IF ¨ GENERATINGCFM THEN
  735.         Macro
  736.         _TEReplaceStyle
  737.             move.w              #$0002,-(sp)
  738.             dc.w                $A83D
  739.         EndM
  740.     ELSE
  741.         IMPORT_CFM_FUNCTION TEReplaceStyle
  742.     ENDIF
  743.  
  744. ;
  745. ; pascal StScrpHandle TEGetStyleScrapHandle(TEHandle hTE)
  746. ;
  747.     IF ¨ GENERATINGCFM THEN
  748.         Macro
  749.         _TEGetStyleScrapHandle
  750.             move.w              #$0006,-(sp)
  751.             dc.w                $A83D
  752.         EndM
  753.     ELSE
  754.         IMPORT_CFM_FUNCTION TEGetStyleScrapHandle
  755.     ENDIF
  756.  
  757. ;
  758. ; pascal void TEStyleInsert(const void *text, long length, StScrpHandle hST, TEHandle hTE)
  759. ;
  760.     IF ¨ GENERATINGCFM THEN
  761.         Macro
  762.         _TEStyleInsert
  763.             move.w              #$0007,-(sp)
  764.             dc.w                $A83D
  765.         EndM
  766.     ELSE
  767.         IMPORT_CFM_FUNCTION TEStyleInsert
  768.     ENDIF
  769.  
  770. ;
  771. ; pascal long TEGetHeight(long endLine, long startLine, TEHandle hTE)
  772. ;
  773.     IF ¨ GENERATINGCFM THEN
  774.         Macro
  775.         _TEGetHeight
  776.             move.w              #$0009,-(sp)
  777.             dc.w                $A83D
  778.         EndM
  779.     ELSE
  780.         IMPORT_CFM_FUNCTION TEGetHeight
  781.     ENDIF
  782.  
  783. ;
  784. ; pascal Boolean TEContinuousStyle(short *mode, TextStyle *aStyle, TEHandle hTE)
  785. ;
  786.     IF ¨ GENERATINGCFM THEN
  787.         Macro
  788.         _TEContinuousStyle
  789.             move.w              #$000A,-(sp)
  790.             dc.w                $A83D
  791.         EndM
  792.     ELSE
  793.         IMPORT_CFM_FUNCTION TEContinuousStyle
  794.     ENDIF
  795.  
  796. ;
  797. ; pascal void TEUseStyleScrap(long rangeStart, long rangeEnd, StScrpHandle newStyles, Boolean fRedraw, TEHandle hTE)
  798. ;
  799.     IF ¨ GENERATINGCFM THEN
  800.         Macro
  801.         _TEUseStyleScrap
  802.             move.w              #$000B,-(sp)
  803.             dc.w                $A83D
  804.         EndM
  805.     ELSE
  806.         IMPORT_CFM_FUNCTION TEUseStyleScrap
  807.     ENDIF
  808.  
  809. ;
  810. ; pascal void TECustomHook(TEIntHook which, UniversalProcPtr *addr, TEHandle hTE)
  811. ;
  812.     IF ¨ GENERATINGCFM THEN
  813.         Macro
  814.         _TECustomHook
  815.             move.w              #$000C,-(sp)
  816.             dc.w                $A83D
  817.         EndM
  818.     ELSE
  819.         IMPORT_CFM_FUNCTION TECustomHook
  820.     ENDIF
  821.  
  822. ;
  823. ; pascal long TENumStyles(long rangeStart, long rangeEnd, TEHandle hTE)
  824. ;
  825.     IF ¨ GENERATINGCFM THEN
  826.         Macro
  827.         _TENumStyles
  828.             move.w              #$000D,-(sp)
  829.             dc.w                $A83D
  830.         EndM
  831.     ELSE
  832.         IMPORT_CFM_FUNCTION TENumStyles
  833.     ENDIF
  834.  
  835. ;
  836. ; pascal short TEFeatureFlag(short feature, short action, TEHandle hTE)
  837. ;
  838.     IF ¨ GENERATINGCFM THEN
  839.         Macro
  840.         _TEFeatureFlag
  841.             move.w              #$000E,-(sp)
  842.             dc.w                $A83D
  843.         EndM
  844.     ELSE
  845.         IMPORT_CFM_FUNCTION TEFeatureFlag
  846.     ENDIF
  847.  
  848. ;
  849. ; pascal OSErr TEGetHiliteRgn(RgnHandle region, TEHandle hTE)
  850. ;
  851.     IF ¨ GENERATINGCFM THEN
  852.         Macro
  853.         _TEGetHiliteRgn
  854.             move.w              #$000F,-(sp)
  855.             dc.w                $A83D
  856.         EndM
  857.     ELSE
  858.         IMPORT_CFM_FUNCTION TEGetHiliteRgn
  859.     ENDIF
  860.  
  861. ;
  862. ; pascal void TESetInlineInputContextPtr(TEHandle hTE, void *contextPtr)
  863. ;
  864.     IF ¨ GENERATINGCFM THEN
  865.         Macro
  866.         _TESetInlineInputContextPtr
  867.             move.w              #$0010,-(sp)
  868.             dc.w                $A83D
  869.         EndM
  870.     ELSE
  871.         IMPORT_CFM_FUNCTION TESetInlineInputContextPtr
  872.     ENDIF
  873.  
  874. ;
  875. ; pascal void TEConfirmInlineInput(TEHandle hTE)
  876. ;
  877.     IF ¨ GENERATINGCFM THEN
  878.         Macro
  879.         _TEConfirmInlineInput
  880.             move.w              #$0011,-(sp)
  881.             dc.w                $A83D
  882.         EndM
  883.     ELSE
  884.         IMPORT_CFM_FUNCTION TEConfirmInlineInput
  885.     ENDIF
  886.  
  887. ;
  888. ; pascal void TESetScrapLength(long length)
  889. ;
  890.     IF GENERATINGCFM THEN
  891.         IMPORT_CFM_FUNCTION TESetScrapLength
  892.     ENDIF
  893.  
  894. ;
  895. ; pascal OSErr TEFromScrap(void )
  896. ;
  897.     IF GENERATINGCFM THEN
  898.         IMPORT_CFM_FUNCTION TEFromScrap
  899.     ENDIF
  900.  
  901. ;
  902. ; pascal OSErr TEToScrap(void )
  903. ;
  904.     IF GENERATINGCFM THEN
  905.         IMPORT_CFM_FUNCTION TEToScrap
  906.     ENDIF
  907.  
  908. ;
  909. ; pascal void TESetClickLoop(TEClickLoopUPP clikProc, TEHandle hTE)
  910. ;
  911.     IF GENERATINGCFM THEN
  912.         IMPORT_CFM_FUNCTION TESetClickLoop
  913.     ENDIF
  914.  
  915. ;
  916. ; pascal void TESetWordBreak(WordBreakUPP wBrkProc, TEHandle hTE)
  917. ;
  918.     IF GENERATINGCFM THEN
  919.         IMPORT_CFM_FUNCTION TESetWordBreak
  920.     ENDIF
  921.  
  922. ;
  923. ; pascal OSStatus TEInsertTextObject(TEHandle hTE, ConstTextObject textObject, TextObjectIndex startIndex, TextObjectIndex endIndex, long insertionStart, long insertionEnd, OptionBits fontSelectionOption)
  924. ;
  925.     IF ¨ GENERATINGCFM THEN
  926.         Macro
  927.         _TEInsertTextObject
  928.             move.w              #$0012,-(sp)
  929.             dc.w                $A83D
  930.         EndM
  931.     ELSE
  932.         IMPORT_CFM_FUNCTION TEInsertTextObject
  933.     ENDIF
  934.  
  935. ;
  936. ; pascal OSStatus TEExtractTextObject(TEHandle hTE, TextObject oldTextObject, TextObject *newTextObject, long textStart, long textEnd)
  937. ;
  938.     IF ¨ GENERATINGCFM THEN
  939.         Macro
  940.         _TEExtractTextObject
  941.             move.w              #$0013,-(sp)
  942.             dc.w                $A83D
  943.         EndM
  944.     ELSE
  945.         IMPORT_CFM_FUNCTION TEExtractTextObject
  946.     ENDIF
  947.  
  948.     ENDIF
  949.     IF FOR_SYSTEM8_COOPERATIVE THEN
  950. ;
  951. ;    TEHandleModernAE is mostly for use by SWM to allow TSM to manage the TextEdit region
  952. ;    to be handled by TextEdit.
  953. ;
  954.     IF FOR_PTR_BASED_AE THEN
  955. ;
  956. ; pascal OSStatus TEHandleModernAE(const AppleEvent *theAppleEvent, AppleEvent *reply, void *refCon, AEHandlerTableRef handlerTable)
  957. ;
  958.     IF GENERATINGCFM THEN
  959.         IMPORT_CFM_FUNCTION TEHandleModernAE
  960.     ENDIF
  961.  
  962.     ENDIF
  963. ;
  964. ; pascal UniversalProcPtr TEGetDoTextHook(void )
  965. ;
  966.     IF GENERATINGCFM THEN
  967.         IMPORT_CFM_FUNCTION TEGetDoTextHook
  968.     ENDIF
  969.  
  970. ;
  971. ; pascal void TESetDoTextHook(UniversalProcPtr value)
  972. ;
  973.     IF GENERATINGCFM THEN
  974.         IMPORT_CFM_FUNCTION TESetDoTextHook
  975.     ENDIF
  976.  
  977. ;
  978. ; pascal UniversalProcPtr TEGetRecalcHook(void )
  979. ;
  980.     IF GENERATINGCFM THEN
  981.         IMPORT_CFM_FUNCTION TEGetRecalcHook
  982.     ENDIF
  983.  
  984. ;
  985. ; pascal void TESetRecalcHook(UniversalProcPtr value)
  986. ;
  987.     IF GENERATINGCFM THEN
  988.         IMPORT_CFM_FUNCTION TESetRecalcHook
  989.     ENDIF
  990.  
  991. ;
  992. ; pascal UniversalProcPtr TEGetFindWordHook(void )
  993. ;
  994.     IF GENERATINGCFM THEN
  995.         IMPORT_CFM_FUNCTION TEGetFindWordHook
  996.     ENDIF
  997.  
  998. ;
  999. ; pascal void TESetFindWordHook(UniversalProcPtr value)
  1000. ;
  1001.     IF GENERATINGCFM THEN
  1002.         IMPORT_CFM_FUNCTION TESetFindWordHook
  1003.     ENDIF
  1004.  
  1005. ;
  1006. ; pascal Handle TEGetScrapHandle(void )
  1007. ;
  1008.     IF GENERATINGCFM THEN
  1009.         IMPORT_CFM_FUNCTION TEGetScrapHandle
  1010.     ENDIF
  1011.  
  1012. ;
  1013. ; pascal void TESetScrapHandle(Handle value)
  1014. ;
  1015.     IF GENERATINGCFM THEN
  1016.         IMPORT_CFM_FUNCTION TESetScrapHandle
  1017.     ENDIF
  1018.  
  1019.     ENDIF
  1020.     IF OLDROUTINENAMES THEN
  1021.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  1022.     ENDIF
  1023.     ENDIF
  1024.     ENDIF ; __TEXTEDIT__ 
  1025.  
  1026.